import { Component, Input } from '@angular/core';

@Component({
  selector: 'app-myc03',
  templateUrl: './myc03.component.html',
  styleUrls: ['./myc03.component.css']
})
export class Myc03Component {

  // @Input()是一个标识，告诉组件这个name属性是外来传入的
  @Input() name: string = '';
  @Input() age: number = 0;
  @Input() boss: boss = {};
}

interface boss {
  name?:string;
  age?:number;
  sex?:string;
}
